package com.ysy.tz.core.selfcomp;

import com.ysy.tz.core.engine.Modelable;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.scene.control.Button;

public class CustomerButton extends Button {
    private ObjectProperty<Modelable> model = new SimpleObjectProperty();

    public CustomerButton() {
    }

    public Modelable getModel() {
        return (Modelable)this.model.get();
    }

    public ObjectProperty<Modelable> modelProperty() {
        return this.model;
    }

    public void setModel(Modelable model) {
        this.setText(model.getModelStringValue());
        this.model.set(model);
    }
}
